Carbon


GetAliasInfo

Header: Aliases.h Carbon status: Supported

Gets information from an alias record without actually resolving the record.

OSErr GetAliasInfo (
    AliasHandle alias, 
    AliasInfoType index, 
    Str63 theString
);
alias

A handle to the alias record to be read.

index

The kind of information to be retrieved. If the value of index is a positive integer, GetAliasInfo retrieves the parent directory that has the same hierarchical level above the target as the index parameter (for example, an index value of 2 returns the name of the parent directory of the target’s parent directory). You can therefore assemble the names of the target and all of its parent directories by making repeated calls to GetAliasInfo with incrementing index values, starting with a value of 0. When the value of index is greater than the number of levels between the target and the root, GetAliasInfo returns an empty string. You can also set the index parameter to one of the values described in “Information Type Constants”.

theString

A string that holds the requested information.

function result

A result code.

DISCUSSION

The GetAliasInfo function returns the information stored in the alias record, which might not be current. To ensure that the information is current, you can resolve and update the alias record before calling GetAliasInfo.

The GetAliasInfo function cannot provide all kinds of information about a minimal alias.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/4/2000)